A magnetic sensor may be capable of sensing components of a magnetic field applied to the magnetic sensor, such as a magnetic field magnitude, a magnetic field intensity, a magnetic field direction (e.g., based on directional components of the magnetic field), etc. The magnetic field of the magnet may depend on a magnetization of the magnet, a shape of the magnet, an environment of the magnet, and other factors. The magnetic sensor may be used to detect, for example, movement, position, an angle of rotation, etc., of a magnet, which may be connected to an object, in a variety of applications, such as a mechanical application, an industrial application, or a consumer application.